@extends('admin.base')
@section('title', '子订单列表')
@section('content')
 <div class="layui-card">
     <fieldset class="layui-elem-field">
         <div class="layui-field-box">
             <a class="layui-btn-sm" href="{{url('admin/home')}}">首页</a>&raquo;
             <a class="layui-btn-sm" href="{{url('admin/order/index')}}">订单列表</a>&raquo;
             <span class="layui-btn-sm" href="{{url('admin/order/son_order?id='.$id)}}">订单号{{$sn}}</span>
         </div>
     </fieldset>
    {{--<div class="layui-card-header">--}}
      {{--<div>--}}
        {{--<span class="pull-left">--}}
          {{--<div class="layui-form">--}}
            {{--<div class="layui-form-item">--}}
              {{--<div class="layui-inline">     --}}
                {{--<label class="layui-form-label">关键字</label>--}}
                {{--<div class="layui-input-inline">--}}
                    {{--<input type="text" class="layui-input" id="sub_keywords" name="keywords" value="{{ isset($keywords) ? $keywords : '' }}"  placeholder="订单号">--}}
                {{--</div>--}}
                {{----}}
                {{--<label class="layui-form-label" >时间</label>--}}
                {{--<div class="layui-input-inline">--}}
                    {{--<input  type="text" class="layui-input" class="jeinput" id="test11" placeholder="创建时间(年月日~年月日)" name="month" value="{{ isset($month) ? $month : '' }}" readonly>--}}
                {{--</div>--}}
                {{--<div class="layui-input-inline">--}}
                  {{--<button class="layui-btn" lay-submit lay-filter="selectsub" >搜索</button>--}}
                {{--</div>--}}
              {{--</div>--}}
            {{--</div>--}}
          {{--</div>--}}
        {{--</span>--}}
      {{--</div>--}}
    {{--</div>--}}

    <div class="layui-card-body">
        <style>
            table tr td.tc,table tr th.tc {
                text-align: center;
                cursor:default;
            }
        </style>
        <table class="layui-table" lay-even lay-size="">
            <colgroup>
                <col width="">
                <col width="">
                <col width="">
                <col width="">
                <col width="">
                <col width="">
            </colgroup>
            <thead>
                <tr>
                    <th class="tc">ID</th>
                    <th class="tc">订单号</th>
                    <th class="tc">产品名称</th>
                    <th class="tc">规格</th>
                    <th class="tc">单价</th>
                    <th class="tc">数量</th>
                    <th class="tc">收货人</th>
                    <th class="tc">收货人联系方式</th>
                    <th class="tc">总价</th>
                    <th class="tc">下单时间</th>
                    <th class="tc">发货状态</th>
                    <th class="tc">操作</th>
                </tr>
                <tbody>
                    @if($list->isEmpty())
                        <tr>
                            <td colspan="12" class="tc">暂无数据</td>
                        </tr>
                    @else
                        @foreach ($list as $v)
                            <tr>
                                <td class="tc">{{ $v['id'] }}</td>
                                <td class="tc">{{ $v['sn_son'] }}</td>
                                <td class="tc">{{ $v['shop_name'] }}</td>
                                <td class="tc">@if($v['shop_attr']){{ $v['shop_attr'] }} @else 无规格 @endif</td>
                                <td class="tc">{{ $v['single_price'] }}</td>
                                <td class="tc">{{ $v['num'] }}</td>
                                <td class="tc">{{ $v['name'] }}</td>
                                <td class="tc">{{ $v['phone'] }}</td>
                                <td class="tc">{{ $v['all_price'] }}</td>
                                <td class="tc">{{ $v['created_at'] }}</td>
                                <td class="tc">@if($v['state'] == 1)待发货 @elseif($v['state'] == 2)待收货 @elseif($v['state' == 3])已完成 @endif</td>
                                <td class="tc">
                                    <div class="layui-btn-group" >
                                        <button class="layui-btn layui-btn-sm"><a href="{{url('admin/order/detail?id='.$v->id)}}" style="color:white">详情</a></button>
                                    </div>
                                </td>

                            </tr>
                        @endforeach
                    @endif
                </tbody>
            </thead>
        </table>
        <!-- 分页 -->
        <div class="sabrosus" >{{ $list->links() }}</div>
    </div>
 </div>
@endsection
@section('js')
@endsection